<?xml version="1.0" encoding="UTF-8"?>
<!--
(c) 2016 Open Source Geospatial Foundation - all rights reserved
This code is licensed under the GPL 2.0 license, available at the root
application directory.
-->
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:context="http://www.springframework.org/schema/context"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="
        http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/mvc
        http://www.springframework.org/schema/mvc/spring-mvc.xsd
        http://www.springframework.org/schema/context
        http://www.springframework.org/schema/context/spring-context.xsd">

    <bean id="proxyBaseExtensionConfigPage" class="org.geoserver.web.MenuPageInfo">
        <property name="id" value="proxyBaseExtensionConfigPage"/>
        <property name="titleKey" value="ProxyBaseExtensionConfigPage.page.title"/>
        <property name="descriptionKey" value="ProxyBaseExtensionConfigPage.page.description"/>
        <property name="componentClass" value="org.geoserver.proxybase.ext.web.ProxyBaseExtensionConfigPage"/>
        <property name="category" ref="settingsCategory" />
        <property name="order" value="200" />
        <property name="icon" value="img/direction-pencil.png" />
    </bean>
    
    <bean id="ProxyBaseExtModule"
		class="org.geoserver.platform.ModuleStatusImpl">
		<property name="module" value="gs-proxy-base-ext" />
		<property name="name" value="Proxy Base Extension" />
		<property name="component" value="Proxy Base Extension plugin" />
		<property name="available" value="true" />
		<property name="enabled" value="true" />
	</bean>

    <bean id="proxyBaseExtUrlMangler" class="org.geoserver.proxybase.ext.ProxyBaseExtUrlMangler" >
        <constructor-arg ref="dataDirectory"/>
    </bean>

    <!-- rest controllers integration -->
    <context:component-scan base-package="org.geoserver.proxybase.ext.rest" />

</beans>